package com.atguigu.yygh.hosp.controller;


import com.atguigu.yygh.common.result.Result;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 医院设置表 前端控制器
 * </p>
 *
 * @author atguigu
 * @since 2021-12-01
 */
@Api(tags = "模拟登陆接口")
@RestController
@RequestMapping("/admin/hosp/hospitalSetUser")
//@CrossOrigin//跨域问题
public class UserLoginController {

    @PostMapping("user/login")
    public Result UserLogin(){

        return Result.ok().data("token","admin-token");
    }

    @GetMapping("/user/info")
    public Result UserInfo(){
        return Result.ok().data("roles","admin")
                            .data("introduction","I am a super administrator")
                            .data("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif")
                            .data("name","Super Admin");
    }
}

